# Topology Control Algorithm makefile

BOOST_INCL_PATH = /Applications/BOOST/
BOOST_LIB_PATH = /Applications/BOOST/libs

# Compiler

CC=g++

# Compiler flags
#   -c:    do not call the linker (assembler outputs object files)
#   -Wall: enable all warnings about questionable code constructions
#   -g:    enable debugging symbols

CFLAGS=-c -Wall -g
#CFLAGS=-c -Wall

# Loader (? or linker?) flags
#   -liw:  wireless extensions library (see iwlib.h)
#   -lpthread: POSIX threads library (see pthread.h)

LDFLAGS=-liw -lpthread
#LDFLAGS=

# Source codes, object codes, and executable
# (use a single space character, " ", as separator)

SOURCES=TCd.cpp
OBJECTS=$(SOURCES:.cpp=.o)
EXECUTABLE=sender

#######################################################################
# TARGETS
# note: remember to start additional lines of a target with a TAB

all: $(SOURCES) $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
	$(CC) $(LDFLAGS) $(OBJECTS) -o $@

.cpp.o:
	$(CC) $(CFLAGS) $< -o $@ \
	-I${BOOST_INCL_PATH}

clean:
	rm -f $(OBJECTS) $(EXECUTABLE)
